import request from '@/utils/request'

// 查询场站历史功率列表
export function listHis(query) {
  return request({
    url: '/trendsDispatch/his/list',
    method: 'get',
    params: query
  })
}

// 查询场站历史功率详细
export function getHis(chargeStationId) {
  return request({
    url: '/trendsDispatch/his/' + chargeStationId,
    method: 'get'
  })
}

// 新增场站历史功率
export function addHis(data) {
  return request({
    url: '/trendsDispatch/his',
    method: 'post',
    data: data
  })
}

// 修改场站历史功率
export function updateHis(data) {
  return request({
    url: '/trendsDispatch/his',
    method: 'put',
    data: data
  })
}

// 删除场站历史功率
export function delHis(chargeStationId) {
  return request({
    url: '/trendsDispatch/his/' + chargeStationId,
    method: 'delete'
  })
}

// 导出场站历史功率
export function exportHis(query) {
  return request({
    url: '/trendsDispatch/his/export',
    method: 'get',
    params: query
  })
}